package com.aiit.mapper;

import com.aiit.annotation.AutoFill;
import com.aiit.dto.TeaOrderDTO;
import com.aiit.entity.TeaOrder;
import com.aiit.enumeration.OperationType;
import com.github.pagehelper.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface OrderMapper {

    @Select("select * from orders ")
    Page<TeaOrder> getByTeaOrderDetail(TeaOrderDTO teaOrderDTO);

    @AutoFill(value = OperationType.UPDATE)
    Long getById(Long id);


    @AutoFill(value = OperationType.UPDATE)
    void payment(TeaOrder teaOrder);

    @AutoFill(value = OperationType.UPDATE)
    void getByIdDeliver(Long id);


    @AutoFill(value = OperationType.UPDATE)
    void deliver(TeaOrder teaOrder);
}
